<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/10/10
  Time: 16:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/bootstrap.css">

    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="${pageContext.request.contextPath}/static/js/jquery-1.11.0.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <link href="${pageContext.request.contextPath}/static/js/bootstrap.min.js"/>
    <%--<script>
        <c:if test="${empty user}">
        window.location.href = "http://localhost:8080/pages/user/login.jsp";
        </c:if>
        <c:if test="${empty account}">
            window.location.href = "http://localhost:8080/pages/user/openaccount.jsp";
        </c:if>
    </script>--%>
    <script>
        function f(){
            window.location.href = "http://localhost:8080/loanServlet?action=findAllLoan";
        }
    </script>
</head>
<body>
<div id = "d1">
<span style="color: gray" onclick="f()"><</span>&nbsp;&nbsp;&nbsp;<span style="display:inline-block;width:200px;font-weight:bold;">
    <h4>所有贷款产品</h4></span>
    <hr>
    <c:forEach items="${sessionScope.loansList}" var="loans">
        <div class="list-group">
                <%--<input type="hidden" >--%>
<%--            <a href="${pageContext.request.contextPath}/loanServlet?action=findLoanById&id=${loans.id}&where=2" class="list-group-item active">--%>
                <h2 class="list-group-item-heading">已贷金额:${loans.pnum}</h2><br>
                <h4>贷款名称:${loans.pname}</h4>
                <br>
                <h4>还款方式:<c:if test="${loans.loan_f==1}">
                    等额本金
                </c:if>
                    <c:if test="${loans.loan_f==2}">
                        等额本息
                    </c:if></h4>
                <h4>贷款时间${loans.payDate}</h4>
                <h4>贷款时长${loans.loanDate}天</h4>
                    <hr>
<%--            </a>--%>
        </div>
    </c:forEach>
</div>

<%--<div class="list-group">
    <a href="#" class="list-group-item active">
        <h4 class="list-group-item-heading">List group item heading</h4>
        <p class="list-group-item-text">...</p>
    </a>
</div>--%>
</body>
</html>
